package com.moli.iov.handle.alarm.enums;

/**
 * <p>
 * 进出围栏枚举 0:进围栏报警,1:出围栏报警
 * </p>
 *
 * @author: zql
 * @Date: 2019/2/18 14:05
 */
public enum AlarmFenceTypeEnum {

    /**
     * 进围栏
     */
    IN(0, "进围栏"),

    /**
     * 出围栏
     */
    OUT(1, "出围栏");

    private int flag;

    private String msg;

    AlarmFenceTypeEnum(int flag, String msg){
        this.flag = flag;
        this.msg = msg;
    }

    public static String getMsg(int flag){
        for(AlarmFenceTypeEnum e : AlarmFenceTypeEnum.values()){
            if(e.flag == flag){
                return e.msg;
            }
        }
        return "";
    }

    public int getFlag() {
        return flag;
    }

    public String getMsg() {
        return msg;
    }
}
